//配置路由相关信息
import VueRouter from 'vue-router'
import Vue from 'vue'

//通过Vue.use(插件)，安装插件
Vue.use(VueRouter)

//创建VueRouter对象
const routes = new VueRouter({
	//配置路由和组件之间的应用关系
	routes:[
			{ path: '',
			   component: Home
			 },
			 { path: '/home', 
			 component: Home 
			},
			{ path: '/about',
			 component: About
			},
	]
})
const router = new VueRouter({
		routes,
		mode:'history'
})
//将router对象传入到vue实例
export default router